package main

import (
	_ "xiaoercaidan/baseApi/routers"
	"github.com/astaxie/beego"
	"xiaoercaidan/publicResources/models"
	"xiaoercaidan/publicResources/config"
	"github.com/astaxie/beego/orm"
)

func init() {

	config.InitConfig("baseApi",false)

}

func main() {

	if beego.BConfig.RunMode == "dev" {
		beego.BConfig.WebConfig.DirectoryIndex = true
		beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
	}

	models.RegisterDB()
	// 自动建表
	orm.RunSyncdb("default", false, true)
	beego.Run()
}
